<%@ page language="java" import="java.util.*,base.*,pojo.*,service.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
  <head>
    <title>阜阳白金汉宫网上订餐</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
	    <link rel="stylesheet" type="text/css" href="../jquery/jscal2.css" />
          <link rel="stylesheet" type="text/css" href="../jquery/border-radius.css" />
            <link rel="stylesheet" type="text/css" href="../jquery/steel/steel.css" />
	    <script type="text/javascript" src="../jquery/jquery-1.7.2.min.js"></script>
	      <script src="../bootstrap/js/bootstrap.js" type="text/javascript"></script>

     <script src="../jquery/jscal2.js"></script>
  <script src="../jquery/en.js"></script>
    
     <style type="text/css">

.STYLE1 {font-size: 18px}
.STYLE2 {font-size: 24px}
 * { margin:0; padding:0; }
body { background:#FFF; color:#333; font:12px/1.6em Helvetica, Arial, sans-serif; }
a { color:#0287CA; text-decoration:none; }
a:hover { text-decoration:underline; }
ul, li { list-style:none; }
fieldset, img { border:none; }
legend { display:none; }
em, strong, cite, th { font-style:normal; font-weight:normal; }
input, textarea, select, button { font:12px Helvetica, Arial, sans-serif; }
table { border-collapse:collapse; }
html { overflow:-moz-scrollbars-vertical; } 
img{width:950px;height:500px;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}
</style>
<script type="text/javascript">
$(function(){
	$("#ok").click(function(){
	var date=$("#date").val();
	var tablearea=$("#tablearea").val();
	var tabletype=$("#tabletype").val();
	var ctype=$("#ctype").val();
	if(date==""){
        alert("请选择就餐时间");
        return false;
    }

   else if(tablearea==0){
    alert("请选择餐桌类别");
       return false;
    }
 
    else if(tabletype==0){
    alert("请输入餐桌类型");
     return false;
     }
    else if(ctype==0){
    alert("请输入时段");
     return false;
     }
    else{$("#form1").submit()}
    
	})
})
</script>
<script type="text/javascript" >
$(function(){
$('.carousel').carousel({
interval: 4000,
});
})
</script>
</head>
  <body>
   <div class="navbar navbar-inverse navbar-fixed-top">
       <div class="navbar-inner">
           <div class="container-fluid">
   <a class="brand" href="index.jsp">白金汉宫网上订餐</a>
       <div class="nav-collapse collapse">
         
<ul class="nav">
<li class="active">
<a href="index.jsp">主页</a>
</li>
<li>
<a href="#myModal" data-toggle="modal">订餐桌</a>
</li>
<li>
<a href="reviewRecord.jsp" >用户点评</a>
</li>
</ul>
<p class="navbar-text pull-right">
         <%
        
		String username = (String)session.getAttribute( "name" );
		CartService cs= new CartService();
		if ( username == null || username == "" )
		{
	%>
<a class="navbar-link" href="login.jsp">登录</a>&nbsp;&nbsp;&nbsp;<a class="navbar-link" href="regest.jsp">注册</a>
<%
} 
		else
		{
		    int userid=(Integer)session.getAttribute("id");
		    int cartNum=cs.getALL(userid);
			out.println( "欢迎您! "+username  );
			out.println("<a href='memberzone.jsp' role='button' class='btn btn-success' >个人中心</a>");
			out.println("<a href='cartlist.jsp' data-placement='bottom' role='button' class='btn btn-warning' data-toggle='tooltip' title='ffff'>我的购物车"+cartNum+"</a>");
			out.println( "<a href='destroySession.jsp' role='button' class='btn btn-danger' >安全退出</a>" );
		}
%>






</p>
	</div>   
   </div>
   </div>
   </div>
   <div class="container-fluid">
   <div class="row-fluid">
   <div class="span3">
   <div class="well sidebar-nav">
   <ul class="nav nav-list">
   <li class="nav-header STYLE2">菜单</li>
   <%                          DishesService ds = new DishesService();	
	                           List<dishesType> list1 = ds.getDishesType();	
	                           for(dishesType d:list1){
			                     out.print("<li> <a href='dishes.jsp?type="+d.getId()+"'  class='STYLE1'>"+d.getName()+"</a></li>");
	                           } 
    %>
   </ul>
   </div>
   </div>
   <div class="span9">
   <div class="hero-unit">
    <div id="list">
<%
	request.setCharacterEncoding("utf-8");
    PictureService ps= new PictureService();
	List<pic> list = ps.getpic();//按参数查询
	%>
	 <div id="myCarousel" class="carousel slide"><!--
    <ol class="carousel-indicators">
    <li data-target='#myCarousel' data-slide-to="0" class='active'><br></li>

 <%
	//for (pic inf : list) {
	//out.println("<li data-target='#myCarousel' data-slide-to="+inf.getId()+"></li>");
	//}	  
		
	
			
%>
    </ol>
	 --><div class="carousel-inner">
	 	<div class='active item'><img src="../images/index.jpg"/>
	 	<div class='carousel-caption'><h4>欢迎光临</h4></div></div>
<%
	for (pic inf : list) {
	out.println("<div class='item'><img src='../"+inf.getPic()+"'>");
    out.println(" <div class='carousel-caption'><h4>"+inf.getTopic()+"</h4><p>"+inf.getDetail()+"</p></div></div>");
	}	  
		
	
			
%>
    </div>
    </div>
  
    </div>
   </div>
<div class="row-fluid">
<div class="span4">
<h2>常见问题</h2>
<p>
    <ol>
    <li>1预订餐桌</li>
    <li>2预订菜品</li>
    <li>3查看购物车，并填写用户的基本信息</li>
    <li>4提交后等待审核</li>
    <li> .......      </li>
    </ol>
</p>
<a class="btn" href="question.jsp">详情 »</a>
</div> 
<div class="span4">
<h2>关于我们</h2>
<p>阜阳白金汉宫大酒店隶属于安徽彩牛集团，是集客房、餐饮、娱乐、商场、办公为一体，是一家建筑风格欧式化的综合性涉外大酒店，占地1.08万平方米，建筑面积2.16万平方米 </p>
<p>  ......</p>
<p>
<a class="btn" href="http://www.iseahotel.com/skin_index_41307001_0">详情 »</a>
</p>
</div>   
</div>
   
   
    </div>



</div>  
<hr>
<footer>
<p>版权所有</p>
</footer> 

<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">查询餐桌剩余情况</h3>
</div>
<div class="modal-body">
    <form id="form1" class="form-search" action="../action/websiteAction/orderTable.jsp" method="post">
    日期：<input type="text" class="input-medium search-query" id="date"  name="date">
    <div id="cont"></div>
    <script type="text/javascript">
 Calendar.setup({
 inputField : "date",
 trigger    : "date",
 onSelect   : function() { this.hide() },
 disabled      : function(date) {
                      return (date<=new Date().setDate(new Date().getDate()));
                             
              },
dateFormat : "%Y-%m-%d",
});
 </script>
<br/><br/><br/>
类别：
<select id="tablearea" name="tablearea">
<option value=0>--请选择--</option>
<option value=1>大厅</option>
<option value=2>包厢</option>
</select>
<br/><br/><br/>
类型：
<select  name="tabletype" id="tabletype"/>
<option value=0>--请选择---</option>
  <%	
                               TableService us = new TableService();
	                           List<TableType> list2 = us.getTableType();
	                           for(TableType d:list2){
		                      
			                     out.print("<option value='"+d.getId()+"'>"+d.getName()+"</option>");
	                           } 
	                           %>
   </select>
   <br/><br/><br/>
选择就餐时段
<select id="ctype" name="ctype">
<option value=0>--请选择--</option>
<option value=1>午餐时段（11时-14时）</option>
<option value=2>晚餐时段（17时-21时）</option>
</select>
<br/><br/><br/>
    <button type="submit" class="btn" id="ok">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;<button type="reset" class="btn" >重置</button>
    </form>
</div>
注：预订餐桌的时间只能预订次日的，即今天预订只能预订明天的
</div>


</div>


  </body>
</html>
